﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masterpages/Admin.Master" AutoEventWireup="true" CodeBehind="EditSelectedAd.aspx.cs" Inherits="cnFederal.EditSelectedAd" %>


<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            height: 99px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

 

 <script language="javascript" type="text/javascript">
     function PrevImg(imgFile) {
         var Preview = document.getElementById('MainContent_imageSelected');
         Preview.src = imgFile.value;
         Preview.style.width = "100px";
         Preview.style.height = "100px";

     }
    </script>

    <script type="text/javascript">
        function setHeight(txtdesc) {
            txtdesc.style.height = txtdesc.scrollHeight + "px";
        }
</script>

    <table width="100%">
        <tr><td align ="center">
            <asp:Label ID="Label1" runat="server" Text="ایجاد و تغییر آگهی" Font-Bold="True" Font-Size="12"></asp:Label>
    
            </td></tr>
        </table>
    
    
    <table runat="server" id="MainTable">
    <tr><td>Date registreded</td><td>   <asp:TextBox ID="txtRegDate" width="170px" 
            runat="server" ToolTip="Kalendar" 
              AutoPostBack="false"  Text ='' TabIndex="21"></asp:TextBox>
             
        
         </td></tr>

            <tr><td>Date Start publish</td><td> 
              <asp:UpdatePanel runat="server" id="UpdatePanel3" updatemode="Conditional">
              <ContentTemplate>
               <asp:TextBox ID="txtDateStartPublish" width="170px" runat="server" ToolTip="Title" 
              AutoPostBack="false"  Text ='' 
                      TabIndex="21" Height="21px"></asp:TextBox>
                <cc1:CalendarExtender ID="CalendarExtender2" TargetControlID="txtDateStartPublish" 
             Format="yyyy-MM-dd" runat="server"
              FirstDayOfWeek="Monday" CssClass="cal_Theme1">
        </cc1:CalendarExtender>
        </ContentTemplate>
        </asp:UpdatePanel>
         </td></tr>

            <tr><td>Date End publish</td><td>   
               <asp:TextBox ID="txtEndPublish" width="170px" runat="server" ToolTip="Title" 
              AutoPostBack="false"  Text ='' TabIndex="21" Height="21px"></asp:TextBox>
                <cc1:CalendarExtender ID="CalendarExtender1" TargetControlID="txtEndPublish" 
             Format="yyyy-MM-dd" runat="server" EnableViewState ="false" 
              FirstDayOfWeek="Monday" CssClass="cal_Theme1">
        </cc1:CalendarExtender>
         </td></tr>

         <tr><td>Type</td>
         <td>
             &nbsp;</td>
         </tr>
         <tr><td>View</td>
         <td>
         <table><tr>
         <td>
             &nbsp;</td>
         
         <td> <asp:RadioButton ID="RadioButtonEnable" Text="Enable View" Checked="true" 
                 runat="server" AutoPostBack="True" GroupName="display" 
                 oncheckedchanged="RadioButtonEnable_CheckedChanged" /></td>
         <td><asp:RadioButton ID="RadioButtonDisable" Text="Disable View" Checked="false" 
                 runat="server" GroupName="display" 
                 oncheckedchanged="RadioButtonDisable_CheckedChanged" /></td>
         </tr></table>

             
         </td>
         
         </tr>
           <tr><td>Title</td><td>   
               <asp:TextBox ID="txtTitle" width="500px" runat="server" ToolTip="Title" style="direction:rtl;"
              AutoPostBack="false"  Text ='' TabIndex="21" Height="58px" TextMode="MultiLine"></asp:TextBox>
            
        
         </td></tr>

         <tr><td>Description</td><td>   
               <asp:TextBox ID="txtDescription" width="500px" runat="server" ToolTip="Header" style="direction:rtl;"
              AutoPostBack="false"  Text ='' TabIndex="21" Height="52px" TextMode="MultiLine"></asp:TextBox>
         </td></tr>

          <tr><td>Ads Url</td><td>   
               <asp:TextBox ID="TxtAdsUrl" width="500px" runat="server" ToolTip="Header" style="direction:rtl;"
              AutoPostBack="false"  Text ='' TabIndex="21" Height="52px" TextMode="MultiLine"></asp:TextBox>
         </td></tr>

         <tr><td>Image</td>
         <td>
         
         <asp:FileUpload ID="fileupload1" runat="server" onchange="PrevImg(this)" />
         
             <asp:Button ID="btnBrows" runat="server" Text="Refresh img" 
                 onclick="btnBrows_Click" />
             <asp:Image ID="imageSelected" runat="server" ImageUrl = '<%# Eval("ImageUrl") %> ' Height="100px" Width="100px"  />
             
         </td></tr>

         <tr>
         <td class="style1">
             <asp:Button ID="btnSubmit" runat="server" Text="Save" 
                 onclick="btnSubmit_Click" /></td>
         <td class="style1"></td>
         </tr>


   
    </table>








</asp:Content>
